package com.ruoyi.base.domain;

import java.util.Date;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 学生对象 base_student
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("学生实体")
@Getter
@Setter
public class BaseStudent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 班级 */
    @Excel(name = "班级")
    @NotNull(message="班级不能为空")
    @ApiModelProperty("班级")
    private Long classId;
    private String className;
    
    /** 专业 */
    @Excel(name = "专业")
    @NotNull(message="专业不能为空")
    @ApiModelProperty("专业")
    private Long specId;
    private String specName;

    /** 年级 */
    @Excel(name = "年级")
    @ApiModelProperty("年级")
    @NotNull(message="年级不能为空")
    private Integer year;

    /** 学号 */
    @Excel(name = "学号")
    @ApiModelProperty("学号")
    @NotNull(message="学号不能为空")
    private String code;

    /** 姓名 */
    @Excel(name = "姓名")
    @ApiModelProperty("姓名")
    @NotNull(message="姓名不能为空")
    private String name;

    /** 性别 */
    @Excel(name = "性别", prompt = "必填项", dictType = "sys_user_sex", combo = {"男","女"})
    @ApiModelProperty("性别")
    @NotNull(message="性别不能为空")
    private String sex;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("出生日期")
    private Date birthday;

    /** 身份证件号 */
    @ApiModelProperty("身份证件号")
    @NotNull(message="身份证件号不能为空")
    private String idcard;

    /** 手机号 */
    @Excel(name = "手机号")
    @ApiModelProperty("手机号")
    private String mobile;

    /** 邮箱 */
    @Excel(name = "邮箱")
    @ApiModelProperty("邮箱")
    private String email;

    /** 民族 */
    @Excel(name = "民族")
    @ApiModelProperty("民族")
    private String nation;

    /** 是否住校 */
    @Excel(name = "是否住校")
    @ApiModelProperty("是否住校")
    private String isLodge;

    /** 类别 */
    @Excel(name = "类别")
    @ApiModelProperty("类别")
    private String type;

    /** 用户ID */
    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    /** 宿舍 */
    @Excel(name = "宿舍")
    @ApiModelProperty("宿舍")
    private Long roomId;

    /** 宿舍 */
    @Excel(name = "宿舍名")
    @ApiModelProperty("宿舍名")
    private String roomName;
    
    /** 状态 */
    @Excel(name = "状态")
    @ApiModelProperty("状态")
    private String status;

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("classId", getClassId())
            .append("specId", getSpecId())
            .append("year", getYear())
            .append("code", getCode())
            .append("name", getName())
            .append("sex", getSex())
            .append("birthday", getBirthday())
            .append("idcard", getIdcard())
            .append("mobile", getMobile())
            .append("email", getEmail())
            .append("nation", getNation())
            .append("isLodge", getIsLodge())
            .append("type", getType())
            .append("userId", getUserId())
            .append("roomId", getRoomId())
            .append("roomName", getRoomName())
            .append("status", getStatus())
            .toString();
    }
	
	public BaseStudent() {}
	public BaseStudent(Long userId) {this.userId = userId;}
}
